﻿@using System.Web

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="~/ckeditor/ckeditor.js"></script>
    <title>@ViewBag.BlogName - @ViewBag.Title</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")

</head>
<body>
    <div class="navbar navbar-inverse navbar-static-top">
        <div class="navbar-inner">
            <div class="container">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <img src="~/Images/46px-Canadian_Lynx_side_head.png" class="pull-left navbar-image" />
                @Html.ActionLink("LynxWebLog", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })<span class="navbar-brand version">@ViewBag.Version</span>
                <div class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li>@Html.RouteLink("Home", new { area = "", controller = "Home", action = "Index" })</li>
                        <li>@Html.RouteLink("About", new { area = "", controller = "Home", action = "About" })</li>
                        <li>@Html.RouteLink("Contact", new { area = "", controller = "Home", action = "Contact" })</li>
                        <li>@Html.RouteLink("Privacy", new { area = "", controller = "Home", action = "Privacy" })</li>
                        <li>@Html.RouteLink("Terms", new { area = "", controller = "Home", action = "Terms" })</li>
                    </ul>
                    @Html.Partial("_LoginPartial")
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <p>
            <a href="@string.Format("{0}://{1}{2}/Blogs/{3}/{4}/Blog/Index/?sort=Name", Context.Request.Url.Scheme,
            Context.Request.Url.Authority, HttpRuntime.AppDomainAppVirtualPath, ViewBag.PageOwner, ViewBag.BlogName)">Index by Name</a>
            &nbsp;&nbsp;&nbsp;
            <a href="@string.Format("{0}://{1}{2}/Blogs/{3}/{4}/Blog/Index/?sort=Date", Context.Request.Url.Scheme,
            Context.Request.Url.Authority, HttpRuntime.AppDomainAppVirtualPath, ViewBag.PageOwner, ViewBag.BlogName)">Index by Date</a>
        </p>
        <div class="carousel" id="myCarousel">
            <div class="carousel-inner">
                <div class="item active">
                    <img src="@ViewBag.HeaderImage"  />
                    <div class="container">
                        <div class="carousel-caption">
                            <h1>@ViewBag.BlogName</h1>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            @if ((bool)ViewBag.CategoryDisplay || (bool)ViewBag.GoogleAdDisplay) {
            <div class="column col-sm-3 col-md-2 col-lg-2">
                @if ((bool)ViewBag.CategoryDisplay) {
                    @Html.Partial("_CategoryPartial")
                }
                @if ((bool)ViewBag.GoogleAdDisplay) {
                    @Html.Partial("_GoogleAdPartial")
                }
            </div>
            <div class="column col-sm-9 col-md-10 col-lg-10">
                @RenderBody()
            </div>
            } else {
            <div class="column col-sm-12 col-md-12 col-lg-12">
                @RenderBody()
            </div>
            }
        </div>
        <hr />
        <footer>
            <p>&copy; @DateTime.Now.Year - J.W. Davidson</p>
        </footer>
    </div>

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)
</body>
</html>
